package repositories

import "gcopyright/models"

func (r *RepositoriesSqlite) QuernAccounts() []models.AccountsTable {
	sql := r.sqlite

	rows, err := sql.Query("SELECT * FROM accounts_table ")
	checkErr(err)
	var Accounts = models.AccountsTable{}
	var arrayAccounts []models.AccountsTable
	for rows.Next() {
		err = rows.Scan(&Accounts.Account, &Accounts.Password, &Accounts.Number)
		arrayAccounts = append(arrayAccounts, Accounts)
		checkErr(err)
	}
	return arrayAccounts

}
